using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestForce : MonoBehaviour
{
    private Rigidbody rb;
    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void Update()
    {
        // 使用AddForce在世界坐标系中施加力
        // rb.AddForce(Vector3.forward * 10.0f, ForceMode.Force);
        
        // 使用AddRelativeForce在本地坐标系中施加力
        rb.AddRelativeForce(Vector3.forward * 10.0f, ForceMode.Force);
    }
}
